package org.midi.j2me.menu;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

import org.midi.j2me.midlet.MenuMIDlet;

public class MenuCanvas extends Canvas {

	public MenuMIDlet midlet;

	int width;

	int height;

	public MenuCanvas(MenuMIDlet midlet) {
		this.setFullScreenMode(true);
		this.midlet = midlet;
		repaint();
	}

	protected void paint(Graphics g) {
		drawBg(g);
	}

	private void drawBg(Graphics g) {
		g.setColor(0);
		g.fillRect(0, 0, width, height);
		g.setColor(0xff00ff);
		g.drawString("test", 20, 0, 20);
	}

	protected void showNotify() {
		width = getWidth();
		height = getHeight();
	}

}
